#include <stdlib.h>
#include <iostream>
#include "solver.h"

using namespace std;

int main(int argv, char **argc) 
{
    int nx(20), ny(20), nz(20);
    double t = 100.0;
    double dt = 1.0;
    bool cn   = false;
    switch (argv-1) {
    case 6:  t = atof(argc[6]);
    case 5: dt = atof(argc[5]);
    case 4: nz = atoi(argc[4]);
    case 3: ny = atoi(argc[3]);
    case 2: nx = atoi(argc[2]);
    case 1: cn = argc[1][0] == 'c';
    default: break;
    }

    Solver solver(nx, ny, nz);

    int steps = t/dt + 1;
    if (!cn)   solver.fwd_euler_step(steps, dt);
    else       solver.cn_step(steps, dt);

    return 0;
}



